package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.HashMap;
import java.util.List;

@Setter
@Getter
@ToString
public class Department {
    private Long id;
    private String name;
    private String sn;
    /**
     * 返回json格式的字符串
     * @return
     */
    public String getJson(){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("sn",sn);
        return JSON.toJSONString(map);
    }

}